package model;

import java.io.IOException;
import java.text.ParseException;
import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		CongTy ct = new CongTy();
		int n;
		
		Scanner s = new Scanner(System.in);
		System.out.print("Nhap so luong nhan vien: ");
		n = s.nextInt();
		
		ct.nhapThongTin(n);
		System.out.println("Quy sinh hoat cua cong ty: " + ct.tinhQSHCT() + "$");
		
		System.out.println("Ghi các thông tin ra file ?");
		System.out.println("\t1. Đồng ý");
		System.out.println("\t2. Bỏ qua");
		
		System.out.print("Lựa chọn của bạn: ");
		int chon = s.nextInt();
		switch (chon) {
		case 1:
			try {
				ct.baoCaoNhanSu("baocaonhansu.txt");
				ct.baoCaoKeToan("baocaoketoan.txt");
			} catch (IOException e) {
				e.printStackTrace();
			}
			break;
		case 2:
			break;

		default:
			break;
		}
		
		try {
			ct.docBaoCaoKeToan("baocaoketoan.txt");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
